package com.azhuo.utils;

import java.util.List;

public class Page<T> {
	private Integer total; // 总条数
	private Integer pageCount; // 总页数
	private Integer page; // 当前页
	private Integer size; // 每一页的条数
	private List<T> rows; // 结果集
	
	public Integer getTotal() {
		return total;
	}

	public void setTotal(Integer total) {
		this.total = total;
	}

	public Integer getPageCount() {
		pageCount = total / size;
		if (total % size > 0) {
			pageCount++;
		}
		return pageCount;
	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public List<T> getRows() {
		return rows;
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	@Override
	public String toString() {
		return "Page [total=" + total + ", page=" + page + ", size=" + size + ", rows=" + rows + "]";
	}
}
